Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-developer is "address-geometry-search-near-gps-position">
it allows to retrieve the complete address (municipality, street and civic number) given the GPS position. It may also
provide a list of services or public transport lines intersecting with the provided GPS position.
Inputs
A JSON with these parameters:
- latitude
number
- latitude of a GPS position
- longitude
number
- longitude of a GPS position
- intersectgeometry
boolean
- true or false (assumed false if missing), if true it reports all the services and public transportation lines that
have a geometry intersecting with the provided GPS position.
Outputs
- A JSON object with properties: • address: the street name. • number: the civic number. • addressUri: the URI identifying
the civic number in the road graph. • municipality: the estimated municipality (it may not work properly on the
municipalities borders) • municipalityUri: the URI identifying the municipality in the road graph. • intersect:
array of objects with properties: o name: name of the intersecting service or public transport line. o uri: URI
of the intersecting service or public transport line. o class: URI representing the class o type: type of geometry
intersecting the GPS position, can be lineString or Polygon o routeType: type of route can be Bus, LightRail,
Ferry, Train o agency: name of the agency providing the service o direction: direction of the line o distance:
distance of the GPS position with the intersecting geometry
Details
The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON.
If the values are not present in the input JSON, these are read by those in the configuration. If they are not present
in either part, an error is generated for the necessary parameters.